<?php
namespace AJax;

$name = $_REQUEST["name"];
// echo $name;
$con = mysqli_connect('localhost','root','root','allall');
if (!$con) {
	die('Could not connect: ' . mysqli_error($con));
}

$sql="SELECT * FROM user WHERE name = '".$name."'";
$result = mysqli_query($con,$sql);

echo "<table>
<tr>
<th>User_id</th>
<th>Name</th>
<th>Age</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
	echo "<tr>";
	echo "<td>" . $row['user_id'] . "</td>";
	echo "<td>" . $row['name'] . "</td>";
	echo "<td>" . $row['age'] . "</td>";
	echo "</tr>";
}
echo "</table>";